﻿@model IEstate.Web.Models.EstateViewModel

@{
    ViewBag.Title = "Add";
}

<div style="margin: 0px 0px 10px 0px; font-family: Cambria; font-size: 25px; font-weight: 300">Add</div>

<link rel="stylesheet" type="text/css" href="~/Content/Style.css" />

@if (ViewBag.Message != null)
{ @ViewBag.Message }

@using (Html.BeginForm("Add", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <div class="data">
        @Html.LabelFor(p => p.Street)
        @Html.TextBoxFor(p => p.Street, new { @class = "textbox-street" })
    </div>
    <div class="data">
        @Html.LabelFor(p => p.City)
        @Html.TextBoxFor(p => p.City, new { @class = "textbox-street" })
    </div>
    <div class="data">
        @Html.LabelFor(p => p.Category)
        @Html.DropDownListFor(p => p.Category, new SelectList(Enum.GetNames(typeof(IEstate.Core.Models.Category))))
    </div>
    <div class="data">
        @Html.LabelFor(p => p.Option)
        @Html.DropDownListFor(p => p.Option, new SelectList(Enum.GetNames(typeof(IEstate.Core.Models.Option))))
    </div>
    <div class="data">
        @Html.LabelFor(p => p.Bedrooms)
        @Html.TextBoxFor(p => p.Bedrooms, new { @class = "textbox-street" })
    </div>
    <div class="data">
        @Html.LabelFor(p => p.Size)
        @Html.TextBoxFor(p => p.Size, new { @class = "textbox-street" })
    </div>
    <div class="data">
        @Html.LabelFor(p => p.Price)
        @Html.TextBoxFor(p => p.Price, new { @class = "textbox-street" })
    </div>

    <div class="data">
        Upload image: <input type="file" name="image" />
    </div>

    <input type="submit" value="Submit" />
}

